﻿@using Webdiyer.WebControls.Mvc;
@using EFramework.Entities.Domain.Account;
@model PagedList<EF_Account_RoleUsersEntity>
<table id="sample-table-2" class="table table-striped table-bordered table-hover">
    <thead>
        <tr>
            <th>编号</th>
            <th>登录名</th>
            <th>称呼</th>
            <th>性别</th>
            <th>电话</th>
            <th>类型</th>
            @*<th class="hidden-480">所属角色</th>*@
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>@item.UserID</td>
                <td>@item.UserName</td>
                <td>@item.NickName</td>
                <td>@item.Sex</td>
                <td>@item.Phone</td>
                <td>@item.UserType</td>
               @* <td class="hidden-480">@item.RoleName</td>*@
                <td class="operation">
                    @if (WorkContext.Uid != item.UserID)
                    {
                        <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">

                            <a href="javascript:;" title="从角色中移除" class="red btn_delfromuser" data-param="@item.UserID">
                                <i class="icon-remove bigger-130"></i>
                            </a>
                        </div>

                        <div class="visible-xs visible-sm hidden-md hidden-lg">
                            <div class="inline position-relative">
                                <button data-toggle="dropdown" class="btn btn-minier btn-yellow dropdown-toggle">
                                    <i class="icon-caret-down icon-only bigger-120"></i>
                                </button>

                                <ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
                                    <li>
                                        <a title="从角色中移除" data-rel="tooltip" class="tooltip-error btn_delfromuser" href="javascript:;" data-original-title="从角色中移除" data-param="@item.UserID">
                                            <span class="red">
                                                <i class="icon-remove bigger-120"></i>
                                            </span>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    }
                </td>
            </tr>
        }

    </tbody>
</table>
<div>
    <div style="float: left; width: 50%">共 @Model.TotalPageCount 页 @Model.TotalItemCount 条记录，当前为第 @Model.CurrentPageIndex 页</div>
    <div class="dataTables_paginate paging_bootstrap">
        @Ajax.Pager(Model, new PagerOptions
{
    PageIndexParameterName = "pageIndex",
    CurrentPagerItemWrapperFormatString = "<li class=\"active\"><a href=\"javascript:;\">{0}</a></li>",
    PagerItemWrapperFormatString = "<li>{0}</li>",
    ContainerTagName = "ul",
    CssClass = "pagination",
    PrevPageText = "«",
    NextPageText = "»"
}, new MvcAjaxOptions { UpdateTargetId = "divRoleUsers", DataFormId = "searchForm" }, new { style = "float:right" })
    </div>
</div>
